<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="vm">
			<btn></btn>
		</div>
		<template id='tem'>
			<div>
				<button @click="click">{{msg}}</button>
			</div>
		</template>
		<script src="../vue.js"></script>
		<script>
			let btn={
				template:'#tem',
				data(){
					return{
						msg:'按钮',
					}
				},
				methods:{
					click(){
						console.log('1');
					}
				}
			}
			new Vue({
				el:'#vm',
				components:{
					btn,
				}
			})
		</script>
	</body>
</html>
